3.1.42 \(\int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^4 \, dx\) [42]

3.1.42.1 Optimal result
3.1.42.2 Mathematica [A] (verified)
3.1.42.3 Rubi [A] (verified)
3.1.42.4 Maple [A] (warning: unable to verify)
3.1.42.5 Fricas [A] (verification not implemented)
3.1.42.6 Sympy [F]
3.1.42.7 Maxima [F]
3.1.42.8 Giac [F]
3.1.42.9 Mupad [F(-1)]

3.1.42.1 Optimal result

Integrand size = 28, antiderivative size = 175 \[ \int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^4 \, dx=\frac {2 \sqrt {a} c^4 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}-\frac {2 a c^4 \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}+\frac {2 a^2 c^4 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}-\frac {2 a^3 c^4 \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}}+\frac {2 a^4 c^4 \tan ^7(e+f x)}{7 f (a+a \sec (e+f x))^{7/2}} \]

output
2*c^4*arctan(a^(1/2)*tan(f*x+e)/(a+a*sec(f*x+e))^(1/2))*a^(1/2)/f-2*a*c^4* 
tan(f*x+e)/f/(a+a*sec(f*x+e))^(1/2)+2/3*a^2*c^4*tan(f*x+e)^3/f/(a+a*sec(f* 
x+e))^(3/2)-2/5*a^3*c^4*tan(f*x+e)^5/f/(a+a*sec(f*x+e))^(5/2)+2/7*a^4*c^4* 
tan(f*x+e)^7/f/(a+a*sec(f*x+e))^(7/2)
 
3.1.42.2 Mathematica [A] (verified)

Time = 5.73 (sec) , antiderivative size = 122, normalized size of antiderivative = 0.70 \[ \int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^4 \, dx=\frac {2 a c^4 \left (105 \sqrt {c} \text {arctanh}\left (\frac {\sqrt {c-c \sec (e+f x)}}{\sqrt {c}}\right )+\sqrt {c-c \sec (e+f x)} \left (-176+122 \sec (e+f x)-66 \sec ^2(e+f x)+15 \sec ^3(e+f x)\right )\right ) \tan (e+f x)}{105 f \sqrt {a (1+\sec (e+f x))} \sqrt {c-c \sec (e+f x)}} \]

input
Integrate[Sqrt[a + a*Sec[e + f*x]]*(c - c*Sec[e + f*x])^4,x]
 
output
(2*a*c^4*(105*Sqrt[c]*ArcTanh[Sqrt[c - c*Sec[e + f*x]]/Sqrt[c]] + Sqrt[c - 
 c*Sec[e + f*x]]*(-176 + 122*Sec[e + f*x] - 66*Sec[e + f*x]^2 + 15*Sec[e + 
 f*x]^3))*Tan[e + f*x])/(105*f*Sqrt[a*(1 + Sec[e + f*x])]*Sqrt[c - c*Sec[e 
 + f*x]])
 
3.1.42.3 Rubi [A] (verified)

Time = 0.44 (sec) , antiderivative size = 157, normalized size of antiderivative = 0.90, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3042, 4392, 3042, 4375, 254, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \sqrt {a \sec (e+f x)+a} (c-c \sec (e+f x))^4 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sqrt {a \csc \left (e+f x+\frac {\pi }{2}\right )+a} \left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^4dx\)

\(\Big \downarrow \) 4392

\(\displaystyle a^4 c^4 \int \frac {\tan ^8(e+f x)}{(\sec (e+f x) a+a)^{7/2}}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle a^4 c^4 \int \frac {\cot \left (e+f x+\frac {\pi }{2}\right )^8}{\left (\csc \left (e+f x+\frac {\pi }{2}\right ) a+a\right )^{7/2}}dx\)

\(\Big \downarrow \) 4375

\(\displaystyle -\frac {2 a^5 c^4 \int \frac {\tan ^8(e+f x)}{(\sec (e+f x) a+a)^4 \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1\right )}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )}{f}\)

\(\Big \downarrow \) 254

\(\displaystyle -\frac {2 a^5 c^4 \int \left (\frac {\tan ^6(e+f x)}{a (\sec (e+f x) a+a)^3}-\frac {\tan ^4(e+f x)}{a^2 (\sec (e+f x) a+a)^2}+\frac {\tan ^2(e+f x)}{a^3 (\sec (e+f x) a+a)}+\frac {1}{a^4 \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1\right )}-\frac {1}{a^4}\right )d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )}{f}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {2 a^5 c^4 \left (-\frac {\arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{a^{9/2}}+\frac {\tan (e+f x)}{a^4 \sqrt {a \sec (e+f x)+a}}-\frac {\tan ^3(e+f x)}{3 a^3 (a \sec (e+f x)+a)^{3/2}}+\frac {\tan ^5(e+f x)}{5 a^2 (a \sec (e+f x)+a)^{5/2}}-\frac {\tan ^7(e+f x)}{7 a (a \sec (e+f x)+a)^{7/2}}\right )}{f}\)

input
Int[Sqrt[a + a*Sec[e + f*x]]*(c - c*Sec[e + f*x])^4,x]
 
output
(-2*a^5*c^4*(-(ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]]/a^( 
9/2)) + Tan[e + f*x]/(a^4*Sqrt[a + a*Sec[e + f*x]]) - Tan[e + f*x]^3/(3*a^ 
3*(a + a*Sec[e + f*x])^(3/2)) + Tan[e + f*x]^5/(5*a^2*(a + a*Sec[e + f*x]) 
^(5/2)) - Tan[e + f*x]^7/(7*a*(a + a*Sec[e + f*x])^(7/2))))/f
 

3.1.42.3.1 Defintions of rubi rules used

rule 254
Int[(x_)^(m_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[x^m, 
 a + b*x^2, x], x] /; FreeQ[{a, b}, x] && IGtQ[m, 3]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4375
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n 
_.), x_Symbol] :> Simp[-2*(a^(m/2 + n + 1/2)/d)   Subst[Int[x^m*((2 + a*x^2 
)^(m/2 + n - 1/2)/(1 + a*x^2)), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c + d*x] 
]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && I 
ntegerQ[n - 1/2]
 

rule 4392
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*( 
d_.) + (c_))^(n_.), x_Symbol] :> Simp[((-a)*c)^m   Int[Cot[e + f*x]^(2*m)*( 
c + d*Csc[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && E 
qQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && RationalQ[n] &&  !( 
IntegerQ[n] && GtQ[m - n, 0])
 
3.1.42.4 Maple [A] (warning: unable to verify)

Time = 7.13 (sec) , antiderivative size = 233, normalized size of antiderivative = 1.33

method result size
default \(\frac {c^{4} \left (105 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{\sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}}\right ) \left (\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1\right )^{\frac {7}{2}}-758 \left (1-\cos \left (f x +e \right )\right )^{7} \csc \left (f x +e \right )^{7}+1078 \left (1-\cos \left (f x +e \right )\right )^{5} \csc \left (f x +e \right )^{5}-770 \left (1-\cos \left (f x +e \right )\right )^{3} \csc \left (f x +e \right )^{3}+210 \csc \left (f x +e \right )-210 \cot \left (f x +e \right )\right ) \sqrt {-\frac {2 a}{\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}}}{105 f \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )-1\right )^{3} \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )^{3}}\) \(233\)
parts \(\frac {2 c^{4} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right )}{f}+\frac {2 c^{4} \left (16 \cos \left (f x +e \right )^{3}+8 \cos \left (f x +e \right )^{2}+6 \cos \left (f x +e \right )+5\right ) \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \tan \left (f x +e \right ) \sec \left (f x +e \right )^{2}}{35 f \left (\cos \left (f x +e \right )+1\right )}+\frac {8 c^{4} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (\cot \left (f x +e \right )-\csc \left (f x +e \right )\right )}{f}+\frac {4 c^{4} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (2 \sin \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f \left (\cos \left (f x +e \right )+1\right )}-\frac {8 c^{4} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (8 \sin \left (f x +e \right )+4 \tan \left (f x +e \right )+3 \sec \left (f x +e \right ) \tan \left (f x +e \right )\right )}{15 f \left (\cos \left (f x +e \right )+1\right )}\) \(295\)

input
int((c-c*sec(f*x+e))^4*(a+a*sec(f*x+e))^(1/2),x,method=_RETURNVERBOSE)
 
output
1/105*c^4/f*(105*2^(1/2)*arctanh(2^(1/2)/((1-cos(f*x+e))^2*csc(f*x+e)^2-1) 
^(1/2)*(-cot(f*x+e)+csc(f*x+e)))*((1-cos(f*x+e))^2*csc(f*x+e)^2-1)^(7/2)-7 
58*(1-cos(f*x+e))^7*csc(f*x+e)^7+1078*(1-cos(f*x+e))^5*csc(f*x+e)^5-770*(1 
-cos(f*x+e))^3*csc(f*x+e)^3+210*csc(f*x+e)-210*cot(f*x+e))*(-2*a/((1-cos(f 
*x+e))^2*csc(f*x+e)^2-1))^(1/2)/(-cot(f*x+e)+csc(f*x+e)-1)^3/(-cot(f*x+e)+ 
csc(f*x+e)+1)^3
 
3.1.42.5 Fricas [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 373, normalized size of antiderivative = 2.13 \[ \int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^4 \, dx=\left [\frac {105 \, {\left (c^{4} \cos \left (f x + e\right )^{4} + c^{4} \cos \left (f x + e\right )^{3}\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right ) - 2 \, {\left (176 \, c^{4} \cos \left (f x + e\right )^{3} - 122 \, c^{4} \cos \left (f x + e\right )^{2} + 66 \, c^{4} \cos \left (f x + e\right ) - 15 \, c^{4}\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )}{105 \, {\left (f \cos \left (f x + e\right )^{4} + f \cos \left (f x + e\right )^{3}\right )}}, -\frac {2 \, {\left (105 \, {\left (c^{4} \cos \left (f x + e\right )^{4} + c^{4} \cos \left (f x + e\right )^{3}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) + {\left (176 \, c^{4} \cos \left (f x + e\right )^{3} - 122 \, c^{4} \cos \left (f x + e\right )^{2} + 66 \, c^{4} \cos \left (f x + e\right ) - 15 \, c^{4}\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )\right )}}{105 \, {\left (f \cos \left (f x + e\right )^{4} + f \cos \left (f x + e\right )^{3}\right )}}\right ] \]

input
integrate((c-c*sec(f*x+e))^4*(a+a*sec(f*x+e))^(1/2),x, algorithm="fricas")
 
output
[1/105*(105*(c^4*cos(f*x + e)^4 + c^4*cos(f*x + e)^3)*sqrt(-a)*log((2*a*co 
s(f*x + e)^2 - 2*sqrt(-a)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x 
+ e)*sin(f*x + e) + a*cos(f*x + e) - a)/(cos(f*x + e) + 1)) - 2*(176*c^4*c 
os(f*x + e)^3 - 122*c^4*cos(f*x + e)^2 + 66*c^4*cos(f*x + e) - 15*c^4)*sqr 
t((a*cos(f*x + e) + a)/cos(f*x + e))*sin(f*x + e))/(f*cos(f*x + e)^4 + f*c 
os(f*x + e)^3), -2/105*(105*(c^4*cos(f*x + e)^4 + c^4*cos(f*x + e)^3)*sqrt 
(a)*arctan(sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + e)/(sqrt(a)*s 
in(f*x + e))) + (176*c^4*cos(f*x + e)^3 - 122*c^4*cos(f*x + e)^2 + 66*c^4* 
cos(f*x + e) - 15*c^4)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sin(f*x + e 
))/(f*cos(f*x + e)^4 + f*cos(f*x + e)^3)]
 
3.1.42.6 Sympy [F]

\[ \int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^4 \, dx=c^{4} \left (\int \left (- 4 \sqrt {a \sec {\left (e + f x \right )} + a} \sec {\left (e + f x \right )}\right )\, dx + \int 6 \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{2}{\left (e + f x \right )}\, dx + \int \left (- 4 \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{3}{\left (e + f x \right )}\right )\, dx + \int \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{4}{\left (e + f x \right )}\, dx + \int \sqrt {a \sec {\left (e + f x \right )} + a}\, dx\right ) \]

input
integrate((c-c*sec(f*x+e))**4*(a+a*sec(f*x+e))**(1/2),x)
 
output
c**4*(Integral(-4*sqrt(a*sec(e + f*x) + a)*sec(e + f*x), x) + Integral(6*s 
qrt(a*sec(e + f*x) + a)*sec(e + f*x)**2, x) + Integral(-4*sqrt(a*sec(e + f 
*x) + a)*sec(e + f*x)**3, x) + Integral(sqrt(a*sec(e + f*x) + a)*sec(e + f 
*x)**4, x) + Integral(sqrt(a*sec(e + f*x) + a), x))
 
3.1.42.7 Maxima [F]

\[ \int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^4 \, dx=\int { \sqrt {a \sec \left (f x + e\right ) + a} {\left (c \sec \left (f x + e\right ) - c\right )}^{4} \,d x } \]

input
integrate((c-c*sec(f*x+e))^4*(a+a*sec(f*x+e))^(1/2),x, algorithm="maxima")
 
output
-1/210*(105*((c^4*cos(2*f*x + 2*e)^2 + c^4*sin(2*f*x + 2*e)^2 + 2*c^4*cos( 
2*f*x + 2*e) + c^4)*arctan2((cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*c 
os(2*f*x + 2*e) + 1)^(1/4)*sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2 
*e) + 1)), (cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*cos(2*f*x + 2*e) + 
 1)^(1/4)*cos(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1)) + 1) - 
(c^4*cos(2*f*x + 2*e)^2 + c^4*sin(2*f*x + 2*e)^2 + 2*c^4*cos(2*f*x + 2*e) 
+ c^4)*arctan2((cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*cos(2*f*x + 2* 
e) + 1)^(1/4)*sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1)), (c 
os(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*cos(2*f*x + 2*e) + 1)^(1/4)*cos 
(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1)) - 1) - 2*(c^4*f*cos( 
2*f*x + 2*e)^2 + c^4*f*sin(2*f*x + 2*e)^2 + 2*c^4*f*cos(2*f*x + 2*e) + c^4 
*f)*integrate((((cos(10*f*x + 10*e)*cos(2*f*x + 2*e) + 4*cos(8*f*x + 8*e)* 
cos(2*f*x + 2*e) + 6*cos(6*f*x + 6*e)*cos(2*f*x + 2*e) + 4*cos(4*f*x + 4*e 
)*cos(2*f*x + 2*e) + cos(2*f*x + 2*e)^2 + sin(10*f*x + 10*e)*sin(2*f*x + 2 
*e) + 4*sin(8*f*x + 8*e)*sin(2*f*x + 2*e) + 6*sin(6*f*x + 6*e)*sin(2*f*x + 
 2*e) + 4*sin(4*f*x + 4*e)*sin(2*f*x + 2*e) + sin(2*f*x + 2*e)^2)*cos(9/2* 
arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + (cos(2*f*x + 2*e)*sin(10*f* 
x + 10*e) + 4*cos(2*f*x + 2*e)*sin(8*f*x + 8*e) + 6*cos(2*f*x + 2*e)*sin(6 
*f*x + 6*e) + 4*cos(2*f*x + 2*e)*sin(4*f*x + 4*e) - cos(10*f*x + 10*e)*sin 
(2*f*x + 2*e) - 4*cos(8*f*x + 8*e)*sin(2*f*x + 2*e) - 6*cos(6*f*x + 6*e...
 
3.1.42.8 Giac [F]

\[ \int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^4 \, dx=\int { \sqrt {a \sec \left (f x + e\right ) + a} {\left (c \sec \left (f x + e\right ) - c\right )}^{4} \,d x } \]

input
integrate((c-c*sec(f*x+e))^4*(a+a*sec(f*x+e))^(1/2),x, algorithm="giac")
 
output
sage0*x
 
3.1.42.9 Mupad [F(-1)]

Timed out. \[ \int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^4 \, dx=\int \sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}\,{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^4 \,d x \]

input
int((a + a/cos(e + f*x))^(1/2)*(c - c/cos(e + f*x))^4,x)
 
output
int((a + a/cos(e + f*x))^(1/2)*(c - c/cos(e + f*x))^4, x)